package com.qk.management.mapper;

import com.qk.dto.role.RoleDTO;
import com.qk.entity.Role;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface RoleMapper {
    @Select("select * from role")
    List<Role> select();//查询所有角色

    @Select("select * from role where id = #{roleId}")
    Role selectById(Integer roleId);//

    List<Role> selectByPage(RoleDTO roleDTO);

    @Delete("delete from role where id = #{id}")
    void deleteById(Integer id);


    void add(Role role);

    void update(Role role);
}
